﻿CREATE PROCEDURE [dbo].[SystemSecurityPolicy_Insert]

@CreatedBy uniqueidentifier
, @ModifiedBy uniqueidentifier
, @Description varchar (24)
, @SystemDescription varchar (24)
, @SecurityPolicy xml
AS
BEGIN
SET NOCOUNT ON

DECLARE @CreatedDate datetime
DECLARE @ModifiedDate datetime
DECLARE @Deleted bit
DECLARE @SystemSecurityPolicyID uniqueidentifier
SET @CreatedDate = GETDATE()
SET @ModifiedDate = GETDATE()
SET @Deleted = 0
SET @SystemSecurityPolicyID = NEWID()

INSERT INTO [dbo].[SystemSecurityPolicy] ([SystemSecurityPolicyID]
, [CreatedDate]
, [CreatedBy]
, [ModifiedDate]
, [ModifiedBy]
, [Deleted]
, [Description]
, [SystemDescription]
, [SecurityPolicy]
)
VALUES (@SystemSecurityPolicyID
, @CreatedDate
, @CreatedBy
, @ModifiedDate
, @ModifiedBy
, @Deleted
, @Description
, @SystemDescription
, @SecurityPolicy
)

SELECT @SystemSecurityPolicyID [SystemSecurityPolicyID]
END
